<?php

namespace app\admin\model;

use think\Model;


class Pvideo extends Model
{

    

    

    // 表名
    protected $name = 'package_video';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];
    

    







    public function package()
    {
        return $this->hasOne(Package::class, 'id', 'package_id');
    }


    public function video()
    {
        return $this->hasOne(\app\common\model\Video::class, 'id','video_id',)->field('video_file,video_key,follow_id,safe_link',true);
    }
}
